<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>小陈</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__admin__/style/bootstrap.css" rel="stylesheet">
    <link href="__admin__/style/font-awesome.css" rel="stylesheet">
    <!--Beyond styles-->
    <link id="beyond-link" href="__admin__/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="__admin__/style/demo.css" rel="stylesheet">
    <link href="__admin__/style/typicons.css" rel="stylesheet">
    <link href="__admin__/style/animate.css" rel="stylesheet">

    <script  src="__UEDITOR__/ueditor/dist/utf8-php/ueditor.config.js" ></script>
    <script  src="__UEDITOR__/ueditor/dist/utf8-php/ueditor.all.min.js" ></script>
    <script  src="__UEDITOR__/ueditor/dist/utf8-php/lang/zh-cn/zh-cn.js"></script>

    

</head>

<body>

    <!-- 头部 -->
    {include file='common/top'}
    <!-- /头部 -->

    <div class="main-container container-fluid">
        <div class="page-container">
            <!-- Page Sidebar左侧 -->
            {include file='common/left'}
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <a href="{:url('Index/index')}">系统</a>
                        </li>
                        <li>
                            <a href="{:url('lst')}">文章管理</a>
                        </li>
                        <li class="active">修改文章</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->
                <!-- Page Body -->
                <div class="page-body">
                    <div class="row">
                        <div class="col-lg-12 col-sm-12 col-xs-12">
                            <div class="widget">
                                <div class="widget-header bordered-bottom bordered-blue">
                                    <span class="widget-caption">新增文章</span>
                                </div>
                                <div class="widget-body">
                                    <div id="horizontal-form">

                                          <!-- From -->
                                        <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                                            <!--   enctype意思是可以上传图片-->
                                            <!--  分配ID 给到 后面edit分方法获取这id -->
                                            <input type="hidden" name="id" value="{$arts.id}" >
                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right" >所属栏目</label>
                                                <div class="col-sm-6">
                                                   <select name="cate_id" value="{}">
                                                    <option value="">选择栏目</option>
                                                        {volist name='cateRes' id='cate'}
                                                            <option {if condition="$arts['cate_id'] eq $cate['id'] " } selected="selected" {/if}
                                                                    {in name="$cate['id']" value="1,5"}  disabled="disabled"    {/in}
                                                            value="{$cate.id}">
                                                            <?php echo str_repeat('--',  $cate['level']*6)?>{$cate.cate_name}</option>
                                                        {/volist}

                                                   </select>
                                                </div>
                                                <p class="help-block col-sm-4 red">* 必填</p>
                                            </div>

                                            
                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">标题</label>
                                                <div class="col-sm-6">
                                                    <input class="form-control" value="{$arts.title}" placeholder=""name="title" required="" type="text">
                                                </div>
                                                <p class="help-block col-sm-4 red">* 必填</p>
                                            </div>



                                            <div class="form-group">
                                                <label for="username"  class="col-sm-2 control-label no-padding-right">置顶</label>
                                                <div class="col-sm-6">
                                                    <div class="radio" style="float:left; padding-right:12px;">
                                                        <label>
                                                            <input name="show_top" value="1" {if condition="$arts['show_top'] eq 1"} type="radio">
                                                            <span class="text">是 </span>
                                                        </label>
                                                    </div>

                                                    <div class="radio" style="float:left; padding-right:12px;">
                                                        <label>
                                                            <input name="show_top" value="0" {if condition="$arts['show_top'] eq 0"} type="radio" checked="checked" >
                                                            <span class="text">否 </span>
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>




                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">关键词</label>
                                                <div class="col-sm-6">
                                                    <textarea class="form-control" name="keywords">{$arts.keywords}</textarea>
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">描述</label>
                                                <div class="col-sm-6">
                                                    <textarea class="form-control" name="descriptiom">{$arts.descriptiom}</textarea>
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">作者</label>
                                                <div class="col-sm-6">
                                                    <input class="form-control" placeholder="" value="{$arts.author}" name="author" type="text">
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">Email</label>
                                                <div class="col-sm-6">
                                                    <input class="form-control" placeholder="" value="{$arts.email}" name="email" type="text">
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">外链接</label>
                                                <div class="col-sm-6">
                                                    <input class="form-control" placeholder="" value="{$arts.link_url }" name="link_url" type="text">
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label for="brand_img"
                                                    class="col-sm-2 control-label no-padding-right">缩略图</label>
                                                <div class="col-sm-6">
                                                    <input name="thumb" type="file">
                                                    {if condition="$arts['thumb']"  neq 1} 
                                                      <img src="__UPADMIN__/{$arts.thumb}" height="30px">
                                                    {else /}
                                                      无图片
                                                    {/if}
                                                </div>
                                            </div>




                                            <div class="form-group">
                                                <label for="username" class="col-sm-2 control-label no-padding-right">文章内容</label>
                                                <div class="col-sm-6">
                                                    <textarea id="content"  name="content">{$arts.content}</textarea>
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-10">
                                                    <button type="submit" class="btn btn-default">保存信息</button>
                                                </div>
                                            </div>


                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
        </div>
    </div>

    <!--Basic Scripts-->
    <script src="__admin__/style/jquery_002.js"></script>
    <script src="__admin__/style/bootstrap.js"></script>
    <script src="__admin__/style/jquery.js"></script>
    <!--Beyond Scripts-->
    <script src="__admin__/style/beyond.js"></script>

    <script type="text/javascript">
	    var ue = UE.getEditor('content',{initialFrameWidth:620,initialFrameHeight:400 ,});
        //     toolbars:[[
        // 'fullscreen','source','undo','redo', 'bold', 'italic', 'underline','fontborden','strikethrough ',
        // 'superscript', 'subscript ','removefonmat' , 'formatmatch' ,'autotypeset' ,
        // 'blockqurote ', 'pasteplain ', 'forecolor ' , 'backcolor', 'insertorderedlist',
        // 'insertunorderedlist' ,'selectall','cleardoc' ]]});

	</script>

</body>

</html>